#ifndef MYEVENTLOOPER_H
#define MYEVENTLOOPER_H

#include <QObject>
#include <QFile>
#include <QThread>
#include <QDebug>

class MyEventLooper : public QObject
{
    Q_OBJECT
public:
    explicit MyEventLooper();
    void moveToThread(QThread *thread);
    void startReadFile(QString filename);
signals:
    //进度条成长信号，当percent=100时，表示完成
    void processGoSig(int percent);
    void loopSig();
public slots:
    void rcvLoopSig();

private:
    bool readFlag=false;
    QFile file;
    unsigned int cntRead=0;
};

#endif // MYEVENTLOOPER_H
